package com.yehangtech.designpattern.结构型_组合模式.service;

/**
 * 叶子节点
 */
public class Leaf extends Component {
    private String name;

    public Leaf(String name) {
        this.name = name;
    }

    @Override
    public String printSelf() {
        return name;
    }
}
